<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../../css/index.css" />
		<link rel="stylesheet" type="text/css" href="../../css/person.css"/>
		<script src="../../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/vant.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="html5plus://ready"></script>
		<link rel="stylesheet" type="text/css" href="../../css/person.css"/>
		<title></title>
	<body>
		<div id="app">
			<van-row>
				<van-nav-bar id="header" title="设置"  left-arrow  @click-left="back"></van-nav-bar>
			</van-row>
			<van-row>
				<van-col span="24">
					<van-cell title="修改密码" is-link @click="Resetpwd"/>
				</van-col>
				<van-col span="24">
					<van-cell title="清空缓存" is-link @click=""/>
				</van-col>
				<van-col span="20" offset="2">
					<van-button size="large"  square type="danger" @click="Quit" id="quit">退出当前账户</van-button>
				</van-col>
			</van-row>
		</div>
		<script type="text/javascript">
			var app =new Vue({
				el:"#app",
				data:{
					
				},
				mounted() {
					plus.key.addEventListener("backbutton",function(){  
						var wv = plus.webview.currentWebview();
						plus.webview.close(wv.id);
					});  
				},
				methods:{
					Resetpwd(){
						plus.webview.create("./Resetpwd.html","Resetpwd");
						plus.webview.show("Resetpwd");
						plus.webview.close("Install");
						
					},
					back:function(){
						plus.webview.close("Install");
					},
					Quit:function(){
						var _this=this;
						localStorage.clear();
						_this.$toast.loading({
							duration: 2000,       // 持续展示 toast
							forbidClick: true, // 禁用背景点击
							loadingType: 'spinner',
							mask:true,
							message: '退出中'
						});
						plus.webview.create("./login.html","login");
						setTimeout(function(){
							_this.$toast.clear();
							plus.webview.show("login");
							plus.webview.close("Install");
						},1000);
					}
				}
				
			})
		</script>
	</body>
</html>
